import React, { Component }from 'react'

class Select extends Component{
  constructor(props) {
    super(props)

  }
  render () {
    let proList = this.props.province.map((pro,index) => {
          return <li key={index} data-id={pro.id} onClick={this.props.changeProvince(index)}>{pro.name}</li>
      });
   return(
     <div className="search-box">
       <ul>
         {proList}
       </ul>
     </div>
   )
  }
}
export default Select;
